package taikai;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author jeffmartin
 */
public class Person implements TeamOrPlayer {

    Person(String firstName, String lastName, Grade grade, String dojo) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.grade = grade;
        this.dojo = dojo;
    }

    /**
     * @return the firstName
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName the lastName to set
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public void setFirstName(String firstName) {
	    this.firstName = firstName;
    }

    /**
     * @return the dojo
     */
    public String getDojo() {
        return dojo;
    }

    /**
     * @return the grade
     */
    public Grade getGrade() {
        return grade;
    }

    /**
     * @param grade the grade to set
     */
    public void setGrade(Grade grade) {
        this.grade = grade;
    }

    /**
     * @param dojo the dojo to set
     */
    public void setDojo(String dojo) {
        this.dojo = dojo;
    }

    /**
     * @return the team
     */
    public Team getTeam() {
        return team;
    }

    /**
     * @param team the team to set
     */
    public void setTeam(Team team) {
        this.team = team;
    }

    @Override
    public String getName() {
        return lastName + " " + firstName;
    }

    public static enum Field {
        FIRST_NAME("First Name"),
        LAST_NAME("Last Name"),
        GRADE("Grade"),
        DOJO("Dojo"),
        TEAM("Team");

        final String title;

        Field(String title) {
            this.title = title;
        }
    }

    private String firstName;
    private String lastName;
    private String dojo;
    private Grade grade;
    private Team team;

}
